package pl.edu.agh.gronoMining.owlToGraphConverter.parser;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.ParseException;

import pl.edu.agh.gronoMining.owlToGraphConverter.graph.Graph;


public interface GraphParser {
	/**
	 * Parse from owl file go graph array
	 * @param in
	 * @return
	 * @throws IOException
	 * @throws ParseException
	 */
	public Graph[] parseFromOwl(InputStream in) throws IOException, ParseException;
	
	/**
	 * parse from line file to graph array
	 * @param in
	 * @return
	 * @throws IOException
	 */
	public Graph[] parseFromLine(InputStream in) throws IOException, ParseException;

	/**
	 * serialize array of graphs to line form. Labels are integers
	 * @param graphs
	 * @param out
	 * @throws IOException
	 */
	public void serializeToSimple(Graph[] graphs, OutputStream out) throws IOException;
	
	/**
	 * serialize array of graphs to line form. Labels are strings
	 * @param graphs
	 * @param out
	 * @throws IOException
	 */	
	public void serializeToExtended(Graph[] graphs, OutputStream out) throws IOException;
}
